<?php

/*
Process Add Update (admin_add_update.pro.php)
*/

$rank_check = "7";
include "../global.inc.php";


$act=$_GET['act'];
$game=$_GET['game'];


if ($act == "limit")
{
mysql_query("DELETE FROM page_limits WHERE page = 'updates' AND game = '$game'");
mysql_query("INSERT INTO page_limits VALUES ('', 'updates', '$per_page', '$game')");

header("Location: ../updates.php?game=$game&error=The+updates+page+limit+has+been+edited!");
}


if (!$act)
{
$add_update = smilies($add_update);
//echo "INSERT INTO updates2 (author,subject,message,timestamp,game) VALUES ('$userid', '$subject', '$add_update', '$timestamp', '$game')";
mysql_query("INSERT INTO updates2 (author,subject,message,timestamp,game) VALUES ( '$userid', '$subject', '$add_update', '$timestamp', '$game')") or die(mysql_error());
mysql_query("UPDATE members2 SET viewed_update = '0' WHERE game = '$game'");

header("Location: ../updates.php?game=$game&error=Your+update+has+been+added!");
}

?>
